package tv.acgn.advertisement.publish.dao;

import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import tv.acgn.advertisement.publish.po.AdUnitPO;

/**
 * @program advertisement-ad-pub-dao
 * @description AdUnit 持久化操作类
 * @author junG
 * @date 2019-05-02 00:49
 **/

@Repository
public interface AdUnitDao extends JpaRepository<AdUnitPO, String> {

    /**
     * 根据推广计划和推广单元名 查询唯一确定的推广单元
     * @author junG
     * @description 根据用户身份码和推广单元名 查询唯一确定的推广单元
     * @date 0:53 2019/5/2
     * @param planId [1]
     * @param unitName [2]
     * @return {@link AdUnitPO}
     */
    Optional<AdUnitPO> findByPlanIdAndUnitName(String planId, String unitName);
}
